<template>
  <div class="container">
    <div class="app-container">
      <el-button type="primary" size="mini" class="addBtn">添加权限</el-button>
      <el-table
        ref="singleTable"
        :data="tableData"
        highlight-current-row
        style="width: 100%"
      >
        <el-table-column
          property="name"
          label="名称"
        />
        <el-table-column
          property="code"
          label="标识"
        />
        <el-table-column
          property="description"
          label="描述"
        />
        <el-table-column
          label="操作"
        >
          <template>
            <el-button type="text" size="small">操作</el-button>
            <el-button type="text" size="small">添加</el-button>
            <el-button type="text" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>
<script>
import { getPermissionListApi } from '@/api/permission'
export default {
  name: 'Permission',
  data() {
    return {
      tableData: []
    }
  },
  created() {
    this.getPermissionList()
  },
  methods: {
    async getPermissionList() {
      const res = await getPermissionListApi()
      console.log(res)
      this.tableData = res
    }
  }
}
</script>
<style lang="scss" scoped>
.addBtn{
 margin: 10px;
}
</style>
